import http from "@/http/index";

//默认导出的api地址
export default {
    //后台访问类型
    select: {
        name: "商品查询",
        url: "/api/product",
        call: async function (params: any = {}) {
            return await http.get(this.url, params)
        }
    },
    insert: {
        name: "商品添加",
        url: "/api/product",
        call: async function (params: any = {}) {
            return await http.post(this.url, params)
        }
    },
    update: {
        name: "商品修改",
        url: "/api/product",
        call: async function (params: any = {}) {
            return await http.put(this.url, params)
        }
    },
    delete: {
        name: "商品删除",
        url: "/api/product",
        call: async function (params: any = {}) {
            return await http.delete(this.url, params)
        }
    }

}